import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./plugins/element.js";

import adminApi from "@/http/adminApi";
import bossApi from "@/http/bossApi";
import customerServiceApi from "@/http/customerServiceApi";
import playmateApi from "@/http/playmateApi";
import tenantApi from "@/http/tenantApi";
import financeApi from "@/http/financeApi";

//把对象adminApi挂载原型上
Vue.prototype.adminApi = adminApi;
Vue.prototype.bossApi = bossApi;
Vue.prototype.customerServiceApi = customerServiceApi;
Vue.prototype.playmateApi = playmateApi;
Vue.prototype.financeApi = financeApi;
Vue.prototype.tenantApi = tenantApi;

Vue.config.productionTip = false;
// 在应用挂载前初始化 Vuex 状态
store.dispatch('initializeStore');

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
